/*
 * @Descripttion:
 * @version:
 * @Author: sueRimn
 * @Date: 2023-12-25 11:50:21
 * @LastEditors: sueRimn
 * @LastEditTime: 2024-01-19 11:38:25
 */
import http from "@/utils/http";
/**
 * @description: 获取商家列表
 * @param {*} data
 */
export const businessList = (data) => {
  return http({
    url: "/backend/Merchant/index",
    method: "GET",
    params: data,
  });
};
/**
 * @description: 获取商家详情
 * @param {*} data
 */
export const businessDetail = (data) => {
  return http({
    url: "/backend/Merchant/getInfo",
    method: "GET",
    params: data,
  });
};

/**
 * @description: 添加商家
 * @param {*} data
 */
export const addBusiness = (data) => {
  return http({
    url: "/backend/Merchant/add",
    method: "POST",
    data,
  });
};
/**
 * @description: 修改商家
 * @param {*} data
 */
export const editBusiness = (data) => {
  return http({
    url: "/backend/Merchant/update",
    method: "POST",
    data,
  });
};
/**
 * @description: 删除商家
 * @param {*} data
 */
export const delBusiness = (data) => {
  return http({
    url: "/backend/Merchant/del",
    method: "POST",
    data,
  });
};
/**
 * @description: 核销积分
 * @param {*} data
 */
export const cancel = (data) => {
  return http({
    url: "/backend/Merchant/cancel",
    method: "POST",
    data,
  });
};
/**
 * @description: 冻结，解除冻结
 * @param {
 *   id: '',
 *   status": 2  2冻结，1解除冻结
 * }
 *
 */
export const chageStatus = (data) => {
  return http({
    url: "/backend/Merchant/chageStatus",
    method: "POST",
    data,
  });
};
